# -*- coding: utf-8 -*-
import datetime
from django.forms import Form, ModelForm, ChoiceField, DateField, CharField, Textarea, HiddenInput
from django.forms.extras.widgets import SelectDateWidget
from okuz.visit.models import Visit


MONTH = (
			(0, '---------'),
			(1, 'styczeń'), (2, 'luty'), (3, 'marzec'),
			(4, 'kwiecień'), (5, 'maj'), (6, 'czerwiec'),
			(7, 'lipiec'), (8, 'sierpień'), (9, 'wrzesień'),
			(10, 'październik'), (11, 'listopad'), (12, 'grudzień')
		);

YEAR = [(y, y) for y in range (1993, datetime.datetime.now ().year+1)];
YEAR.insert (0, MONTH[0]); 
YEAR = (YEAR);


class DateForm (Form):
	month = ChoiceField (choices = MONTH);
	year = ChoiceField (choices = YEAR);


class VisitForm (Form):
	profile = CharField (required = False, widget = HiddenInput ());
	leave_from = DateField (required = False, widget = SelectDateWidget, label = u"Zwolnienie od");			
	leave_to = DateField (required = False, widget = SelectDateWidget, label = u"Zwolnienie do");
	comment = CharField (widget = Textarea (attrs = {'cols': 40, 'rows': 4}), label = u"Uwagi");
	recommendation = CharField (widget = Textarea (attrs = {'cols': 40, 'rows': 4}), label = u"Zalecenia");

